package com.ruoyi.fangyuan.config;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

import javax.validation.constraints.NotNull;

/**
 * @Title: RoutingDataSource
 * @Description:
 * @Auther: 龙天
 * @Version: 1.0
 * @create 2023/5/5 15:05
 */
public class RoutingDataSource extends AbstractRoutingDataSource {
    @NotNull
    @Override
    protected Object determineCurrentLookupKey() {
        return DBContextHolder.get();
    }
}
